package com.xk39.mybatisplusdemo.controller;


import com.xk39.mybatisplusdemo.pojo.User;
import com.xk39.mybatisplusdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户 前端控制器
 * </p>
 *
 * @author xk39
 * @since 2021-09-23
 */
@RestController
@RequestMapping("/user")
public class UserController {
    
    @Autowired
    private UserService userService;
    
    @RequestMapping("/all")
    public List<User> getAll(){
        return userService.list();
    }
}

